﻿@inherits Vowei.Web.G18nWebViewPage<IEnumerable<Vowei.Data.Models.Statistics.EarnedValueStatistics>>
@using Vowei.Core.Models;
@using Vowei.Web.Models;

@{
    var project = (Project)ViewData[Vowei.Web.Models.WebConstants.ViewData.Project];
    ViewBag.Title = string.Format(T("[{0}] 的挣值分析"), project.Title);
}

<h2>@ViewBag.Title</h2>


<table id="@Vowei.Web.Models.WebConstants.TicketsTableId">
    <tr>
        <th>@T(r => r.First().Date)</th>
        <th>
            @T(r => r.First().BCWS)            
        </th>
        <th>
            @T(r => r.First().ACWP)            
        </th>
        <th>
            @T(r => r.First().BCWP)            
        </th>
        <th>
            @T(r => r.First().PlanedWorkHours)            
        </th>
        <th>
            @T(r => r.First().FinishedWorkHours)            
        </th>
        <th>
            @T(r => r.First().CV)            
        </th>
        <th>
            @T(r => r.First().SV)            
        </th>
        <th>
            @T(r => r.First().CPI)            
        </th>
        <th>
            @T(r => r.First().SPI)            
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            <a href="/Statistics/EvDetails/?id=@project.ID&date=@item.Date.Ticks">@T(item.Date)</a>
        </td>
        <td>
            @T(item.BCWS)
        </td>
        <td>
            @T(item.ACWP)
        </td>
        <td>
            @T(item.BCWP)
        </td>
        <td>
            @item.PlanedWorkHours.TotalHours
        </td>
        <td>
            @item.FinishedWorkHours.TotalHours
        </td>
        <td>
            @T(item.CV)
        </td>
        <td>
            @T(item.SV)
        </td>
        <td>
            @T(item.CPI)
        </td>
        <td>
            @T(item.SPI)
        </td>
    </tr>
}
</table>

<p>
    <a href="/Ticket/ExportToExcel/?title=@Server.UrlEncode(ViewBag.Title)">@T("导出到Excel")</a> |
    <a href="/Statistics/Connect/?id=@project.ID&type=@WebConstants.Statistics.EarnedValue">@T("使用Excel分析")</a>
</p>

